def test_list(name_list):
    print(name_list);
    name_list.append(24);
    name_list.remove(12);


my_list = [12,133,133];



def test_list2(name_list):
    print("test2 函数执行开始");
    print(name_list);
    name_list = name_list + name_list;
    print("test2 函数执行完成");
    print(name_list);

name_list = [233];



#定义一个缺省函数。
def print_info(name,gender = True):
    gender_text = "男生";

    if not gender:
        gender_text = "女生";

    print("%s 是 %s" % (name, gender_text));




if __name__ == '__main__':

    test_list(my_list);
    print(my_list);

    test_list2(name_list);
    print(name_list);

    print_info("小明", True);
    # 调用时如果没有指定缺省参数，则使用函数定义时默认的参数值。
    print_info("小张");
    print_info("妹子", gender=False);
